Source: migration.php

<?php
// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}

// Migration logic (placeholder - expand based on actual needs)
function hoa_horizon_migrate_old_options() {
    // This function is a placeholder for migration logic from an old plugin (e.g., HOA Harmony).
    // Implement actual migration logic here if needed, or remove if not applicable.
    $old_active = get_option('hoa_harmony_active');
    if ($old_active) {
        // Migrate old options to new names
        $old_site_name = get_option('hoa_harmony_site_name');
        if ($old_site_name) update_option('hoa_horizon_site_name', $old_site_name);
        $old_announcement_visibility = get_option('hoa_harmony_announcement_visibility');
        if ($old_announcement_visibility) update_option('hoa_horizon_announcement_visibility', $old_announcement_visibility);
        $old_frontend_roles = get_option('hoa_harmony_frontend_roles');
        if ($old_frontend_roles) update_option('hoa_horizon_frontend_roles', $old_frontend_roles);
        $old_frontend_users = get_option('hoa_harmony_frontend_users');
        if ($old_frontend_users) update_option('hoa_horizon_frontend_users', $old_frontend_users);
        $old_login_bg_color = get_option('hoa_harmony_login_bg_color');
        if ($old_login_bg_color) update_option('hoa_horizon_login_bg_color', $old_login_bg_color);
        $old_login_text_color = get_option('hoa_harmony_login_text_color');
        if ($old_login_text_color) update_option('hoa_horizon_login_text_color', $old_login_text_color);
        $old_login_button_color = get_option('hoa_harmony_login_button_color');
        if ($old_login_button_color) update_option('hoa_horizon_login_button_color', $old_login_button_color);
        $old_modules = get_option('hoa_harmony_modules');
        if ($old_modules) update_option('hoa_horizon_modules', $old_modules);
        
        // Clean up old options
        delete_option('hoa_harmony_active');
        delete_option('hoa_harmony_site_name');
        delete_option('hoa_harmony_announcement_visibility');
        delete_option('hoa_harmony_frontend_roles');
        delete_option('hoa_harmony_frontend_users');
        delete_option('hoa_harmony_login_bg_color');
        delete_option('hoa_harmony_login_text_color');
        delete_option('hoa_harmony_login_button_color');
        delete_option('hoa_harmony_modules');
        delete_option('hoa_harmony_notice_shown');
    }
}